home *** CD-ROM | disk | FTP | other *** search
- module DrBob42
- {
- interface Rates
- {
- float interest_rate();
- void SetRate(in float rate);
- };
-
- typedef float Money;
-
- enum AccountType
- {
- normal,
- saving
- };
-
- struct NormalAccount
- {
- Money balance;
- };
-
- struct SavingAccount
- {
- Money balance;
- Rates rates; // interface
- };
-
- union NormalOrSavingAccount switch (AccountType)
- {
- case normal:
- NormalAccount accountN;
- case saving:
- SavingAccount accountS;
- };
-
- const unsigned long ArraySize = 3;
- typedef NormalOrSavingAccount AccountArray[ArraySize];
-
- typedef sequence<NormalOrSavingAccount> AccountSequence;
-
- interface Accounts
- {
- void AccountArrayTest(in AccountArray Accounts);
- void AccountSequenceTest(in AccountSequence Accounts);
- };
- };
-